import axios from 'axios'
import naiveui from '../utils/naiveui';

export const request = axios.create({ baseURL: '' })

request.interceptors.response.use(res => {
    return Promise.resolve(res)
}, err => {
    // if (err.status == 400 || err.status == 401 || err.status == 404) {
    //     console.log('lanjieqi')
    //     return Promise.resolve(err)
    // }
    // return Promise.reject(err)
    console.log(err)
    naiveui.message.error(err.response.data.error)

});

